from django.views.generic.simple import direct_to_template
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
import settings
handler404 = 'Scope.views.paginanaoencontrada'
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'Juvenis.views.home', name='home'),
    # url(r'^Juvenis/', include('Juvenis.foo.urls')),
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:

    (r'^media/(.*)$', 'django.views.static.serve',
         {'document_root': settings.MEDIA_ROOT}),
    url(r'^admin_tools/', include('admin_tools.urls')),
    url(r'^admin/', include(admin.site.urls)),
    (r'^js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'templates/js'}),
    (r'^$', 'Scope.views.homepage'),
    (r'^tags/', include('Tags.urls')),
    (r'^index$', 'Scope.views.homepage'),
    (r'^robots\.txt$', direct_to_template,
     {'template': 'robots.txt', 'mimetype': 'text/plain'}),
    (r'^sitemap\.xml$', direct_to_template,
     {'template': 'sitemap.xml', 'mimetype': 'text/plain'}),
    (r'^google32e2253a4dc4929c\.html$', direct_to_template,
     {'template': 'google32e2253a4dc4929c.html', 'mimetype': 'text/plain'}),
    (r'busca','Scope.views.busca'),
    (r'^shopping/$', 'Scope.views.todososprodutos'),
    (r'^shopping/(?P<slugcategoria>[\w_-]+)/(?P<slugproduto>[\w_-]+)/$', 'Scope.views.produto'),
    (r'^igreja/$', 'Scope.views.igrejas'),
    (r'^igreja/(?P<slugigreja>[\w_-]+)/$', 'Scope.views.igreja'),
    (r'^igreja/(?P<slugigreja>[\w_-]+)/(?P<slugcongregacao>[\w_-]+)/$', 'Scope.views.congregacao' ),
    (r'^fotos/$', 'Scope.views.todasasfotos'),
    (r'^foto/$', 'Scope.views.todasasfotos'),
    (r'^fotos/(?P<sluggaleria>[\w_-]+)/$', 'Scope.views.galeria'),
    (r'^blog/$','Scope.views.todososblogs'),
    (r'^blog/(?P<slugdoblog>[\w_-]+)/$', 'Scope.views.blog'),
    (r'^blog/(?P<nomedoblog>[\w_-]+)/(?P<slug>[\w_-]+)/$', 'Scope.views.blognoticia' ),
    (r'^(?P<slugcategoria>[\w_-]+)/(?P<slugnoticia>[\w_-]+)/$', 'Scope.views.noticiainterna'),
    (r'^download/$','Scope.views.download'),
    (r'^downloads/$','Scope.views.download'),
    (r'^eventos/$','Scope.views.evento'),
    (r'^artigos/$','Scope.views.artigo'),
    (r'^musicas/$','Scope.views.musica'),
    (r'^humor/$','Scope.views.humor'),
    (r'^videos/(?P<slugvideo>[\w_-]+)$', 'Scope.views.videointerna'),
    (r'^videos/$', 'Scope.views.videosPrincipal'),
    (r'^ultimas-noticias/$', 'Scope.views.ultimas'),
    (r'busca','Scope.views.busca'),
    (r'^(?P<slugcategoriap>[\w_-]+)/(?P<slugproduto>[\w_-]+)/$', 'Scope.views.produto' ),
)